package experiment;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import datasource.image.MIRFlickr;

import summarizer.newversion.GreedySummarizerItOptNewFilter;
import summarizer.newversion.RandomSummarizer;
import summarizer.newversion.Summarizer;
import thesis.DataObject;
import thesis.InfoUnit;
import thesis.Summary;

public class Visualizer {

	public static void visualize(HashMap<Long, DataObject> memoryTweets,
			List<Dimension> dimensions,
			ArrayList<Double> weights, double alpha, double beta, double gamma) {
		ArrayList<InfoUnit> infoUnits = new ArrayList<InfoUnit>();
		double[][] probs = Preprocess.prepareForSummarization(memoryTweets,
				dimensions, weights, infoUnits);
		ArrayList<Summarizer> summarizers = new ArrayList<Summarizer>();
		summarizers.add(new GreedySummarizerItOptNewFilter(probs, infoUnits,
				alpha, beta, gamma));
		summarizers.add(new RandomSummarizer());
		for (int i = 0; i < summarizers.size(); i++) {
			Summary summary = summarizers.get(i).computeSummary(6, 1,
					(HashMap<Long, DataObject>) memoryTweets.clone(),
					dimensions.size());
			MIRFlickr.writeImage(summary, summarizers.get(i).toString());
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
